package com.atguigu.flink.chapter05.source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;
import java.util.List;

/**
 * @Author lizhenchao@atguigu.cn
 * @Date 2022/1/12 13:56
 */
public class Flink01_Source_List {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);
        List<String> list = Arrays.asList("a", "a a", "hello", "atguigu");
    
        DataStreamSource<String> steam = env.fromCollection(list);
        steam.print();
    
        env.execute();
    }
}
